package com.trf.member.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author 小小唐
 * @Date 2023/3/4-星期六-14:32
 * 添加Mybatis-Plus配置类开启事务管理、Mapper接口扫描、分页功能
 */
@EnableTransactionManagement //开启事物管理
@MapperScan("com.trf.member.mapper") //扫描Mapper接口
@Configuration
public class MybatisPlusConfig {

    /**
     * 分页插件
     * @return
     */
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        return new PaginationInterceptor();
    }
}
